<div class="layui-fluid layui-anim website-anim" id="website-indicator-add" lay-title="评审标准管理新增">
    <div class="layui-row website-container">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body website-table-full">
                    <form class="layui-form layui-table-form" lay-filter="standard-table-form">
                        <div class="layui-row">
                            <div class="layui-col-md12">
                                <div class="layui-form-item">
                                    <div class="layui-inline layui-col-md12">
                                        <label class="layui-form-label website-form-item-require">名称:</label>
                                        <div class="layui-input-block">
                                            <input type="hidden" name="standardId" data-th-value="${standardId}">
                                            <input type="text" name="name" autocomplete="off" lay-verify="required" class="layui-input" >
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md12">
                                <div class="layui-form-item">
                                    <div class="layui-inline layui-col-md12">
                                    <label class="layui-form-label website-form-item-require">权重:</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="weight" autocomplete="off" lay-verify="required" class="layui-input" >
                                    </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md12">
                                <div class="layui-form-item">
                                    <div class="layui-inline layui-col-md12">
                                    <label class="layui-form-label website-form-item-require">描述:</label>
                                    <div class="layui-input-block">
                                        <textarea name="description" lay-verify="required" placeholder="请输入内容" rows="5" class="layui-textarea"></textarea>
                                    </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item website-hide">
                            <button class="layui-btn" lay-submit="" lay-filter="indicator-add-form-submit" id="submit"></button>
                            <button type="reset" class="layui-btn" id="reset"></button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script data-th-inline="none" type="text/javascript">
    layui.use(['jquery', 'form', 'table', 'website'], function () {
        var $ = layui.jquery,
            website = layui.website,
            form = layui.form,
            table = layui.table,
             $view = $('#website-indicator-add'),
            $searchForm = $view.find('form'),
            validate = layui.validate;
        form.verify(validate);
        form.render();
        var lock = false;
        form.on('submit(indicator-add-form-submit)', function (data) {
            if(!lock) {
                //加锁防止多次回调
                lock=true;
                website.post(ctx + 'indicator', data.field, function () {
                layer.closeAll();
                website.alert.success('新增成功');
                $('#website-standard-update').find('#query').click();
                });
            }
            return false;
        });
    })
</script>